#ifndef DIALOGPREFERENCES_H
#define DIALOGPREFERENCES_H

#include <QDialog>
#include <QMap>
#include <QColor>
#include "xmlhighlighter.h"

class QSignalMapper;

namespace Ui {
class DialogPreferences;
}

class DialogPreferences : public QDialog
{
    Q_OBJECT
    
public:
    explicit DialogPreferences(QWidget *parent = 0);
    ~DialogPreferences();
    void setColors(const QMap<HighlightType,QColor> &map);
    void setColor(QPushButton* btn,const QColor &color);
    QMap<HighlightType, QColor> getColors();

public slots:
    void showColorDialog(int id);
    
private:
    Ui::DialogPreferences *ui;
    QSignalMapper *m_mapper;
    QMap<HighlightType, QColor> map;
};

#endif // DIALOGPREFERENCES_H
